package NowCoderHuaWei;

import java.util.Scanner;

public class Test15 {

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		while(in.hasNext())
		{
			int n=in.nextInt();
			int num=0;
			String str=Integer.toBinaryString(n).toString();
			for(int i=0;i<str.length();i++)
			{
				if(str.charAt(i)=='1')
					num++;
			}
			System.out.println(num);
		}
		in.close();
	}

}
